package com.linln.admin.config;


import com.linln.admin.rsa.ToInterfaceTool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ToInterFaceToolConfig {

    @Value("${wx.appJkId}")
    private String appJkId;

    @Value("${wx.appJkSecret}")
    private String appJkSecret;
    @Value("${wx.hospitalId}")
    private String hospitalId;
    @Value("${wx.orgId}")
    private String orgId;

    @Bean
    public ToInterfaceTool toInterfaceTool(){
        ToInterfaceTool toInterfaceTool = new ToInterfaceTool();
        toInterfaceTool.setKey(appJkId, appJkSecret);
        toInterfaceTool.setHeaders(hospitalId, orgId, "");
        return toInterfaceTool;
    }
}
